package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.MenuDao;
import com.itheima.pojo.Menu;
import com.itheima.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class MenuServiceImpl implements MenuService {
    @Autowired
    private MenuDao menuDao;

    @Override
    public List<Menu> findall() {
        List<Menu> findall = menuDao.findall();
        return findall;
    }

    @Override
    public List<Integer> findMenuByRoleId(int id) {
        List<Integer> ids=menuDao.findMenuByRoleId(id);
        return ids;
    }
}
